
    <script type="text/javascript">
        $(function(){
            if($.browser.msie) { 
                $("#pics-nav").hide();
            }else{
                 $("#pics-nav").show();
            }
        });
        var share_images = new Object();
        var goods_comments = new Array();
        var pic_page_data = new Array();
        var pic_c_page;
        var pic_page_total = <?php echo count($share_detail['imgs']); ?> ;
        
        function getImgInfo(obj)
        {
            //替换左侧图片价格
            var id = $(obj).attr("keys");
            var imgobj = new Object();
            var goodscomments_html;
            
            pic_c_page = id

            setPicPage();
            
            imgobj = share_images["img" + id];
             var img_width;
            var img_height;
            if(imgobj.img_width > 558){
                img_width = 558;
                img_height = 558/imgobj.img_width*imgobj.img_height;
            }else{
                img_width = imgobj.img_width;
                img_height = imgobj.img_height;
            }
            
            var imgsrc = $(obj).find("img").attr("big_img");
			
            if(imgsrc.indexOf("http://")== 0){
                 imgsrc = imgsrc;
            }else{
                imgsrc = SITE_URL+imgsrc;
            }
            
            if($.browser.msie) {
                
                $('.t_main-pic a img').attr("src", imgsrc);
                $('.t_main-pic a img').css("width", img_width);
                $('.t_main-pic a img').css("height", img_height);
            }else{
                $('.t_main-pic a img').stop();
                $('.t_main-pic a img').hide();
                $('.t_main-pic a img').css("width", img_width);
                $('.t_main-pic a img').css("height", img_height);
                $('.t_main-pic a img').attr("src", imgsrc);
                $('.t_main-pic a img').fadeTo(800, 1);
            }

            $(obj).siblings(".c").removeClass("c");
            $(obj).addClass("c");
            if (imgobj.type == 'g') {
                $('.t_pic-auction a').attr("href", imgobj.to_url);
                $('.t_pic-auction a b').attr("title", imgobj.name);
                $('.t_pic-auction a b').html(imgobj.name);
                $('.t_pic-auction a strong').html(imgobj.price_format);
                $('.t_pic-auction').fadeTo("slow", 1);
                //如果取过数据就不在读取
                if(goods_comments[imgobj.goods_id] == null || goods_comments[imgobj.goods_id].length == null){
                    //替换左侧评论
                    var query = new Object();
                    query.id = imgobj.goods_id;
                    $.ajax({
                        url: SITE_PATH + "services/service.php?m=note&a=goodscomment",
                        type: "POST",
                        data: query,
                        cache: false,
                        dataType: "json",
                        success: function(result) {
                            //判断评论数据
                            goods_comments[imgobj.goods_id] = result.html;
                            goodscomments_html = result.html;
                            $("#goodscomment").fadeIn(300);
                        }
                    });
                }else{
                    goodscomments_html = goods_comments[imgobj.goods_id];
                }
                $("#goodscomment").html(goodscomments_html);
                $("#goodscomment").fadeIn(300);
            } else {
                $('.t_pic-auction').hide();
                $("#goodscomment").hide();
            }

        }


        //设置上一页下一页图片跳转
        function setPicPage() {
            if(pic_c_page==1){
                $("#pics-nav .up_page").hide();
            }else{
                $("#pics-nav .up_page").show();
            }
            if(pic_c_page == pic_page_total){
                $("#pics-nav .down_page").hide();
            }else{
                $("#pics-nav .down_page").show();
            }
        }
        
        function clickPage(pagetype){
            if(pagetype == 'up_page'){ //上一页
                pic_c_page--;
            }else{
                pic_c_page++
            }
            
            var objdata = new Object();
            objdata = $("#img_"+pic_page_data[pic_c_page]);
            getImgInfo(objdata);
            setPicPage();
        }
        
        $(window).scroll( function() {
             if($.browser.msie) { 
                $("#pics-nav").hide();
            }else{
                 var div_height = $('.t_main-pic').position().top+$('.t_main-pic').height()-450;
                var scroll_height = $(document).scrollTop();
                if(scroll_height>div_height){
                    $("#pics-nav").fadeOut(500);
                }else{
                    $("#pics-nav").fadeIn(500);
                }
            }
            var dwidth=parseInt($('.t_main-pic').width())-31;
            $("#pics-nav .down_page").css("left",dwidth+"px");
        } );
        
        
    </script>
    
    
<div class="product_view">
    
    <!-- 新版面 -->
    <!--头部操作栏-->
    <div class="i_lefter">
        
    
        <div class="t_pic-operation" >
            <div style="overflow:hidden;zoom:1;padding-bottom:10px;">
                <a href="javascript:;" class="fl" onclick="$.Fav_Share({$share_detail['share_id']}, this, 32, '#note_{$share_detail['share_id']}');"><img class="fl add_fav_new" src="./tpl/images/like.png" /></a>
                <a href="#pic-comments" class="t_comment">评论</a>
                <span class="nwl_cfav"><span class="SHARE_FAV_COUNT">{$share_detail['collect_count']}</span><i></i></span>
                <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare" style="width:26px; float:right; overflow:hidden;">   
                    <span class="bds_more"></span>
                </div>
                <script type="text/javascript" id="bdshare_js" data="type=tools&mini=1" ></script> 
                <script type="text/javascript" id="bdshell_js"></script> 
                <script type="text/javascript">
//在这里定义bds_config
var bds_config = {"bdText": "<?php echo cutstr($share_detail['share_content'],200); ?>"};
<?php $bu_share_img = getImgName($current_obj['img'], 0, 0, 0, 1); ?>
bds_config.bdPic = "{$bu_share_img}";
document.getElementById('bdshell_js').src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
                </script>

                <a href="javascript:;" onclick="$.Relay_Share($share_detail['share_id']);" class="nwl_forward">转发({$share_detail['relay_count']})</a>

            </div>
        </div>
        <!--图片模块-->
        <div class="t_main-pic">
<!--             <div id="pics-nav" style="display: none">
                <div class="up_page"><a href="javascript:;" onclick="clickPage('up_page')">上一页</a></div>
                <div class="down_page"><a href="javascript:;" onclick="clickPage('down_page')">下一页</a></div>
            </div> -->
            <?php
                if($current_obj['img_width']>558){
                    $img_width = 558;
                    $img_height = 558/$current_obj['img_width']*$current_obj['img_height'];
                }else{
                    $img_width = $current_obj['img_width'];
                    $img_height = $current_obj['img_height'];
                }
                
            ?>
            <a href="{if $current_type == 'bao' || $current_obj['is_tdj']==1}$current_obj['to_url']{else}{$current_obj['img']}{/if}"{if $current_type == 'bao' || $current_obj['is_tdj']==1}{$current_obj['tdj']}{/if} target="_blank" class="show_big">
                <img style="width:{$img_width};height:{$img_height};" width="{$img_width}" height="{$img_height}" class="lazyload" original="{getimg $current_obj['img'] 0 0}" src="./tpl/images/lazyload.gif" scaleType="3"/>
            </a>
        </div>
        

        <div class="t_pic-auction" <!--{if $current_type == 'photo'}--> style="display: none" <!--{/if}-->>
            <a href="{$current_obj['to_url']}"{$current_obj['tdj']} target="_blank">
                <b title="{$current_obj['name']}">{$current_obj['name']}</b>
                <span class="t_buy-btn"></span>
                <strong>
                    {$current_obj['price_format']}
                </strong>

            </a>
        </div>
        

        <!--商品描述-->
        <div class="t_pic-desc">
            <div class="t_tags">
                <div id="SHARE_TAGS_{$share_detail['share_id']}" class="fashion">
                    <!--{if $is_eidt_tag}-->
                    <div class="ed_fashion SHARE_TAG_EDIT_BOX">
                        <div class="box_item">
                            <div class="fa_title">
                                <div class="fsl fl">{sprintf share_tag_tip $_FANWE['setting']['share_tag_count']}</div>
                                <div class="fsr fr"><a onclick="$.ShareTagClose('{$share_detail['share_id']}', this)" href="javascript:;">关闭</a></div>
                            </div>
                            <div class="clear"></div>
                            <div class="fa_inp">
                                <?php
                                $tags_val = array();
                                foreach($share_tags as $share_tag)
                                {
                                $tags_val[] = $share_tag['tag_name'];
                                }
                                $tags_val = implode(' ',$tags_val);
                                ?>
                                <input type="text" value="{$tags_val}" class="SHARE_TAG text">
                                <a onclick="$.ShareTagSave('{$share_detail['share_id']}', this)" href="javascript:;" style="text-align:center; line-height:30px; font-size:14px; color:#fff;">提交</a>
                            </div>
                            <div class="clear"></div>
                        </div>
                    </div>
                    <!--{/if}-->
                    <div class="sw_fashion SHARE_TAG_SHOW_LIST">
                        <span>时尚元素：</span>
                        <!--{if empty($share_tags)}-->
                        <!--{if $is_eidt_tag}-->
                        <span class="SHARE_TAG_LIST"></span>
                        <span class="edit"><a onclick="$.ShareTagEdit('{$share_detail['share_id']}', this)" href="javascript:;">添加</a></span>
                        <!--{/if}-->
                        <!--{else}-->
                        <span class="SHARE_TAG_LIST">
                            <!--{loop $share_tags $share_tag}-->
                            <a href="{$share_tag['url']}" target="_blank">$share_tag['tag_name']</a>
                            <!--{/loop}-->
                        </span>
                        <!--{if $is_eidt_tag}-->
                        <span class="edit"><a onclick="$.ShareTagEdit('{$share_detail['share_id']}', this)" href="javascript:;">编辑</a></span>
                        <!--{/if}-->
                        <!--{/if}-->
                    </div>
                </div>
            </div>
            <div class="t_desc"><b class="t_quot-start"></b>{anchor $share_detail['content']}<b class="t_quot-end"></b></div>
            <div class="t_time" >  <span >{date $share_detail['create_time']}</span></div>
            <div class="clear"></div>
        </div>
        
        <!-- 底部评论 -->
        <div class="note_comment" id="pic-comments">
            <form method="post">
                <div class="pub_box" id="publish_note">
                    <div class="pub_edit r5">
                        <div><span class="fw_count">{sprintf char_check 140}</span></div>
                        <div>
                            <img class="fl pr10 " style="clear: both" src="{avatar $_FANWE['user']['avatar'] s}" height="64">
                            <textarea name="content" class="PUB_TXT pub_txt fl rl5" length="140" position="0"></textarea>
                            <input type="button" value="评论" class="pub_btn fl rr5" onclick="$.Add_Share_Comment(this, '#SHARE_COMMENT_LIST_{$share_detail['share_id']}')">
                        </div>
                        <div class="pub_ext">
                            <div class="pub_opt fl">
                                <span class="fl">{lang add}：</span>
                                <a w="note" onclick="$.Show_Expression(this)" href="javascript:;" style="background-position: 0pt -3px;" class="add_face">{lang face}</a>
                            </div>
                            <div class="pub_out fr">
                                <input id="comment_relay_tweet" type="checkbox" name="is_relay" value="1" />
                                <label for="comment_relay_tweet">{lang js_relay_share}</label>
                                <input type="hidden" value="$share_detail['share_id']" name="share_id" />
                                <input type="hidden" name="parent_id" value="0" />
                                <input type="hidden" name="comment_type" value="note" />
                            </div>
                        </div>
                    </div>
                </div>
                <div id="SHARE_COMMENT_LIST_BOX">
                    <ul id="SHARE_COMMENT_LIST_{$share_detail['share_id']}" class="c_l rb5">
                        <!--{loop $share_detail['comments'] $comment}-->
                        <li class="c_f" id="COMMENT_{$comment['comment_id']}">
                            <!--{getuser $comment['uid'] 0 'm' ',avt'}-->
                            <div>
                                <p class="p1">
                                    <!--{if $is_remove_comment}-->
                                    <a onclick="$.Delete_Comment($comment['comment_id'], this);" class="del fr ml10" href="javascript:void(0);">删除</a>
                                    <!--{/if}-->
                                    <a class="rpl fr" href="javascript:;" uname='{$comment['user']['user_name']}' cid="{$comment['comment_id']}" onclick="$.Reply_Comment(this);">回复</a>
                                    <!--{getuser $comment['uid'] 1 '' 'uname'}-->
                                    <span>&nbsp;&nbsp;&nbsp;&nbsp;{$comment['time']}</span>
                                </p>
                                <p class="p2">{anchor $comment['content']}</p>
                            </div>
                        </li>
                        <!--{/loop}-->
                    </ul>
                    <div class="pagination clearfix mt20">
                        <!--{subtemplate inc/pages}-->
                    </div>
                </div>
            </form>
        </div>
        <div id="goodscomment">
            <!--{if $current_type == 'bao'}-->
            <!--{dynamic getGoodsComment args=$current_obj['goods_id']}-->
            <!--{/if}-->
        </div>
        
    </div>
    
    
    <div class="i_righter">
    <!--{template inc/u/u_me_right}-->
    </div>
    <div class="clear"></div>
    